//
//  GestureCellViewModel.swift
//  EasePods
//
//  Created by 易先生 on 2024/4/30.
//

import Foundation
import CRPEarPhone
import RxDataSources
import RxCocoa

public class GestureCellViewModel: ViewModel {
    
    public let isSelect = BehaviorRelay(value: false)
    
    let buttonMode: CRPButtonMode
    public let buttonFuncType: CRPButtonFuncType
    
    init(bunntonMode: CRPButtonMode, buttonFuncType: CRPButtonFuncType) {
        self.buttonFuncType = buttonFuncType
        self.buttonMode = bunntonMode
    }
    
    public override func isEqual(_ object: Any?) -> Bool {
        guard let other = object as? GestureCellViewModel else { return false }
        return self.buttonFuncType == other.buttonFuncType && self.buttonMode == other.buttonMode
    }
}

extension GestureCellViewModel: IdentifiableType {
    
    public typealias Identity = String
    
    public var identity: String {
        let id = "\(self.buttonMode.rawValue)-\(self.buttonFuncType.rawValue))"
        return id
    }
}
